#include <stx/test/test.hpp>

TEST_CASE (core_macro)
{
    static_assert(0 == std::strong_ordering::equal);
    static_assert(std::strong_ordering::less < 0);
    static_assert(std::strong_ordering::greater > 0);

    static_assert(COMPILER_IS_CLANG);
    static_assert(!COMPILER_IS_GCC);
    static_assert(!COMPILER_IS_MSVC);

    CHECK(ton(MACRO_TO_STRING(__LINE__)) == __LINE__);

    static_assert(COMPILER_IS_CLANG);
    static_assert(MACRO_CONCAT(__LINE__, __LINE__) > __LINE__);
    CHECK(MACRO_TO_STRING(__LINE__) == tos(__LINE__));

    auto n  = 123;
    auto fn = [](auto&& v)
    { static_assert(std::same_as<decltype(v), decltype(FORWARD(v))>); };

    fn(123);
    fn(n);
    fn((n));
    fn(std::move(n));
}
